package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "administrator")//管理员表
public class Administrator extends BaseModel {
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    @IsAutoIncrement   //自增
    @IsKey             //actable主键注解
    @Column(comment = "管理员ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    @TableField("admin_id")
    private Long adminId;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;

    @Column(comment = "管理员姓名")
    @TableField("admin_name")
    private String adminName;
    @Column(comment = "管理员账号密码")
    @TableField("admin_password")
    private String adminPassword;
    @Column(comment = "管理员创建时间")
    @TableField("create_time")
    private String createTime;
    @Column(comment = "管理员信息更新时间")
    @TableField("update_time")
    private String updateTime;
}